• Friday, September 27, 2024

    Git-absorb is a tool designed to enhance the Git workflow by automating the process of creating fixup commits. It is particularly useful for developers who want to maintain atomic commits while efficiently addressing feedback or making corrections to their code. The tool allows users to absorb uncommitted changes into the appropriate previous commits without the need for manual intervention. The concept behind git-absorb is inspired by Facebook's hg absorb, which allows users to fold uncommitted modifications into draft changesets seamlessly. When a developer has uncommitted changes on top of existing commits, running git absorb will automatically identify which changes can be integrated into previous commits. If conflicts arise, those changes remain uncommitted, allowing for a smooth workflow when applying review feedback. To use git-absorb, a developer simply stages the changes they wish to absorb and runs the command. The tool will generate fixup commits for each change, which can then be integrated into the corresponding commits using Git's rebase functionality. This process eliminates the need for manually identifying commit SHAs or performing interactive rebases, streamlining the workflow significantly. Installation of git-absorb can be done through various package managers across different operating systems, including Arch Linux, Debian, Fedora, and macOS. For those who prefer to compile from source, the tool can be built using Cargo, the Rust package manager. Users are advised to ensure that their environment is set up correctly to allow for the command to be recognized by Git. The tool also offers configuration options to customize its behavior. For instance, users can adjust the maximum number of commits git-absorb will consider when searching for candidates to fix up, or they can set it to automatically stage all changes if nothing is staged. Additionally, there are options to control how fixup commits are generated, allowing for either individual or combined fixups. Future enhancements for git-absorb are planned, including the implementation of a force flag, improved error handling, and more comprehensive testing. Overall, git-absorb represents a significant improvement in the Git workflow, making it easier for developers to manage their commits and maintain a clean project history.

  • Thursday, September 12, 2024

    This developer was debugging late at night because a critical bug emerged in their project just hours before a crucial demo. Faced with over 100 commits to sift through, they used git bisect, which uses binary search, to find the commit that introduced the bug. They saved themselves hours of pain by knowing that git bisect exists and also knowing how to use git bisect properly.

  • Monday, August 19, 2024

    GitHub's new Copilot Autofix is a future that analyzes vulnerabilities in code and offers code suggestions to help fix them. The feature has been enabled by default for customers on GitHub Enterprise Cloud and will be offered for free in pull requests in open source projects beginning in September. It works with dozens of classes of vulnerabilities. Developers can dismiss, edit, or comment on suggestions in pull requests.

  • Thursday, April 11, 2024

    Aider is a command-line tool that lets you directly edit code in your files while pair-programming with GPT. It will git commit changes with AI-generated commit messages.

  • Friday, May 10, 2024

    Ellipsis is an AI dev tool that reviews pull requests and converts GitHub comments into working, tested code.

    Hi Impact
  • Wednesday, March 6, 2024

    Most people stick to basic Git commands. This article discusses less common but powerful Git commands. One useful command is git switch, which offers safer, more focused branch switching compared to git checkout. Another is git restore, which simplifies file restoration and replaces some uses of git reset and git checkout. For large monorepos, git sparse-checkout improves performance by checking out only specific directories. git worktree enables working on multiple branches simultaneously, removing the need for stashes or multiple repo clones.

    Md Impact
  • Thursday, March 7, 2024

    GitHub developed “merge queue” to provide a streamlined, automated, and consistent method for deploying and merging code across its repositories. Merge queue's key features include dynamic grouping of pull requests, automatic conflict detection, and integration with GitHub Actions for testing. After a phased rollout, merge queue is now the primary way GitHub engineers ship code, leading to better deployment velocity and developer satisfaction.

  • Monday, March 25, 2024

    GitHub introduced a beta for code-scanning autofix, merging GitHub’s Copilot with CodeQL to detect and automatically remedy security vulnerabilities in JavaScript, TypeScript, Java, and Python.

    Hi Impact
  • Friday, April 12, 2024

    This guide goes over Git, from key terms to important commands and workflows. It covers branches, commits, and HEAD, along with workflows like forking, feature branches, and more.

    Hi Impact
  • Thursday, March 7, 2024

    SapFix is Meta’s deployment of automated end-to-end fault fixing. It makes debugging easy by automatically generating fixes for specific issues and proposing those fixes to engineers for approval and deployment to production. SapFix has been used for many of Meta’s core apps, each containing millions of lines of code. It uses automated program repair algorithms that identify, analyze, and patch known software bugs without human intervention.

  • Monday, July 15, 2024

    Git 2.38 introduced the --update-refs feature to streamline the process of rebasing stacked branches. This new feature automatically updates dependent branches when the base branch is rebased, eliminating the need for manual rebasing and potential conflicts. It can be used in various scenarios, including rebasing a stack of branches, updating stacked branches on a changed branch, and interactive rebasing.

  • Thursday, April 11, 2024

    Git’s error messages can be confusing to understand, but there are some great strategies to help decode them. Git status clarifies the current branch state, and git log helps examine commits and identify divergence points. You can also customize your shell prompt to display branch status, which can be helpful.

  • Tuesday, July 16, 2024

    Facebook uses Mercurial instead of Git, building custom workflows on top of the tool for performance. Facebook used Git years ago, but it started facing performance issues, and the response from Git maintainers wasn't cooperative, with the maintainers pushing back on improving performance and instead recommending that Facebook shard its monorepo. The Facebook team looked at its alternatives and chose Mercurial, which had a community of maintainers who were welcoming to changes made by them. The story shows how kindness and openness can go far in the world of devtools.

  • Thursday, September 26, 2024

    The GitHub blog post discusses the strategies and tools used to enhance system availability through iterative simplification, particularly in the context of scaling a complex platform like GitHub. The author, Nick Hengeveld, emphasizes the importance of monitoring and addressing performance issues proactively to maintain a seamless user experience. To manage the growing demands on their system, GitHub employs various tools for monitoring and analysis. Key among these are Datadog for tracking metrics and performance patterns, Splunk for analyzing event context and troubleshooting, and custom monitors for identifying slow database queries. The use of the Scientist tool allows for testing proposed changes to ensure they improve performance before implementation. Additionally, Flipper is utilized for controlled rollouts of new features, enabling gradual exposure to users while monitoring for any issues. A specific example highlighted in the post involves optimizing a SQL query related to the Command Palette feature, which was causing timeouts due to inefficient data retrieval. By reworking the query logic and conducting experiments with the Scientist tool, the team achieved significant performance improvements, reducing query timeouts by 80-90%. Further optimizations were made by eliminating unnecessary queries and batching access checks, leading to additional performance gains. The blog also discusses the importance of removing unused code to prevent potential performance degradation. By analyzing request data and identifying bottlenecks, the team was able to simplify the code for a frequently accessed endpoint, resulting in improved latency and a more consistent user experience. Throughout the process, several key lessons emerged: the value of investing in observability to quickly identify and resolve issues, the need to consider adjacent code for potential improvements, and the importance of making small, controlled changes to monitor their impact effectively. The overarching message is that maintaining system performance is an ongoing effort that requires vigilance and a proactive approach to problem-solving.

  • Monday, June 17, 2024

    In 2012, Google embarked on a project to reformat all Bazel BUILD files, which was tough because of inconsistent formatting and a variety of developer preferences. A new tool called Buildifier, which strictly enforced a unified style, was developed to automate this process. The rollout was successful - it allowed for better code maintenance and enabled large-scale changes that were previously considered impossible.

  • Tuesday, July 2, 2024

    Jujutsu is a new version control system that is on track to replace Google's existing version control systems. It has an interesting approach to its design choices in terms of both implementation details and user interface. Jujutsu can be used with existing Git repositories. This article introduces the system and walks readers through how to use it.

  • Wednesday, October 2, 2024

    Sourcebot is a powerful tool designed for fast code indexing and searching across codebases, particularly those hosted on GitHub and GitLab. It is built on the Zoekt search engine, which is known for its speed and efficiency. The tool is packaged as a single Docker image, making it easy to deploy and use. Users can search through millions of lines of code in their repositories, whether they are public or private, and the software is licensed under the MIT license. One of the standout features of Sourcebot is its one-command deployment capability, allowing users to get started quickly with a simple Docker command. The tool supports multi-repository searches, enabling users to index and search through multiple repositories seamlessly. It also offers full file visualization, allowing users to view entire files directly from search results. The interface is modern and user-friendly, featuring syntax highlighting, light and dark modes, and vim-style navigation. To begin using Sourcebot, users can run a Docker command that pulls the latest image and starts the web server on their local machine. The setup process involves creating a configuration file that specifies which repositories to index. This configuration can be tailored to include specific repositories from GitHub or GitLab, and users can easily manage their settings through a dedicated workspace. For indexing private repositories, users need to provide an access token. For GitHub, this involves generating a Personal Access Token (PAT) with the appropriate permissions, while for GitLab, a similar token is required. The tokens must be passed as environment variables when running the Docker container. Sourcebot also includes telemetry features that collect anonymized usage data to improve the tool's performance and reliability. Users have the option to disable telemetry if they prefer not to share any usage data. Overall, Sourcebot is a robust solution for developers looking to enhance their code search capabilities, providing a fast, efficient, and user-friendly experience for managing and searching through large codebases.

  • Friday, August 9, 2024

    Hugging Face serves and stores a lot of data, most of it in LFS. XetHub has written its own, powerful, alternative for scaling Git repositories.

  • Wednesday, October 2, 2024

    Sourcebot is a powerful tool designed for fast code indexing and searching across codebases, particularly those hosted on GitHub and GitLab. It is built on the Zoekt search engine, which is known for its speed and efficiency. The tool is packaged as a single Docker image, making it easy to deploy and use with just a single command. Sourcebot is licensed under the MIT license, allowing for broad usage and modification. The main features of Sourcebot include one-command deployment via Docker, the ability to search across multiple repositories, and lightning-fast performance. Users can visualize entire files directly from search results, and the interface is modern, offering features like syntax highlighting and dark mode. To get started with Sourcebot, users can run a simple Docker command that sets up the application and maps it to a local port for easy access. Configuration is straightforward, allowing users to specify which repositories to index by creating a configuration file. This file can include public and private repositories, and users can easily set up their environment to index their own codebases. For those using GitHub, a Personal Access Token (PAT) is required to index private repositories. Similarly, GitLab users need a token to access their repositories. The setup process involves creating a configuration file that specifies the repositories to be indexed and running the Docker command with the appropriate environment variables. Sourcebot also supports building from source for those interested in contributing to its development. This requires installing certain dependencies and following specific build instructions. Additionally, Sourcebot collects anonymized usage data to improve its performance and reliability, although users can opt out of this telemetry if desired. Overall, Sourcebot provides a robust solution for developers looking to enhance their code search capabilities across large codebases.

  • Tuesday, July 2, 2024

    In 1998, Linus Torvalds, creator of Linux, was overwhelmed by the growing number of code changes from developers. The solution they found was BitKeeper, a distributed version control system. Linux adopted BitKeeper in 2002, but its proprietary nature caused friction with free software advocates. Frustrated, Torvalds started developing Git, which gained popularity and became mainstream due to GitHub.

  • Tuesday, March 26, 2024

    Git stores project history locally as objects and references (like branches). When you use 'git push', and your git remote is with GitLab, it sends these updates to a remote GitLab server. How you connect (SSH or HTTP(S)) determines the authentication method: SSH uses GitLab Shell for key-based verification, while HTTP(S) relies on Workhorse and Rails for authentication. Once authenticated, Gitaly takes over, managing your Git repository and executing 'git-receive-pack' to handle the incoming changes. Gitaly is used by GitLab to read and write Git data.

  • Tuesday, June 11, 2024

    Great contributions to a codebase prioritize well-tested features over rushed solutions, have TODOs and feature flags to manage ongoing work, and refactor existing code in-place whenever possible. New changes should be broken down into digestible pull requests. They should also have the same patterns and code style of the existing codebase.

  • Thursday, April 25, 2024

    Augment, a startup backed by Eric Schmidt (former CEO of Google), has launched to rival GitHub Copilot with a new AI-powered coding platform.

  • Monday, July 15, 2024

    GitHub is starting to decline in quality and is showing signs of legacy software. A recent issue with the blame view feature, which appears to be caused by a React frontend rewrite, is evidence of this decline. GitHub's priorities may have shifted.